package com.ruoyi.driver.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.TbDriverCarInfoMapper;
import com.ruoyi.driver.domain.TbDriverCarInfo;
import com.ruoyi.driver.service.ITbDriverCarInfoService;

/**
 * 网约车信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-27
 */
@Service
public class TbDriverCarInfoServiceImpl implements ITbDriverCarInfoService 
{
    @Autowired
    private TbDriverCarInfoMapper tbDriverCarInfoMapper;

    /**
     * 查询网约车信息
     * 
     * @param onlineCarInfoId 网约车信息主键
     * @return 网约车信息
     */
    @Override
    public TbDriverCarInfo selectTbDriverCarInfoByOnlineCarInfoId(Integer onlineCarInfoId)
    {
        return tbDriverCarInfoMapper.selectTbDriverCarInfoByOnlineCarInfoId(onlineCarInfoId);
    }

    /**
     * 查询网约车信息列表
     * 
     * @param tbDriverCarInfo 网约车信息
     * @return 网约车信息
     */
    @Override
    public List<TbDriverCarInfo> selectTbDriverCarInfoList(TbDriverCarInfo tbDriverCarInfo)
    {
        return tbDriverCarInfoMapper.selectTbDriverCarInfoList(tbDriverCarInfo);
    }

    /**
     * 新增网约车信息
     * 
     * @param tbDriverCarInfo 网约车信息
     * @return 结果
     */
    @Override
    public int insertTbDriverCarInfo(TbDriverCarInfo tbDriverCarInfo)
    {
        tbDriverCarInfo.setCreateTime(DateUtils.getNowDate());
        return tbDriverCarInfoMapper.insertTbDriverCarInfo(tbDriverCarInfo);
    }

    /**
     * 修改网约车信息
     * 
     * @param tbDriverCarInfo 网约车信息
     * @return 结果
     */
    @Override
    public int updateTbDriverCarInfo(TbDriverCarInfo tbDriverCarInfo)
    {
        tbDriverCarInfo.setUpdateTime(DateUtils.getNowDate());
        return tbDriverCarInfoMapper.updateTbDriverCarInfo(tbDriverCarInfo);
    }

    /**
     * 批量删除网约车信息
     * 
     * @param onlineCarInfoIds 需要删除的网约车信息主键
     * @return 结果
     */
    @Override
    public int deleteTbDriverCarInfoByOnlineCarInfoIds(Integer[] onlineCarInfoIds)
    {
        return tbDriverCarInfoMapper.deleteTbDriverCarInfoByOnlineCarInfoIds(onlineCarInfoIds);
    }

    /**
     * 删除网约车信息信息
     * 
     * @param onlineCarInfoId 网约车信息主键
     * @return 结果
     */
    @Override
    public int deleteTbDriverCarInfoByOnlineCarInfoId(Integer onlineCarInfoId)
    {
        return tbDriverCarInfoMapper.deleteTbDriverCarInfoByOnlineCarInfoId(onlineCarInfoId);
    }
}
